import request from '../untils/request'
const  getPro = async ()=>{
    const res = await request.get('/api/base/wellProject/listProject')
    return res.data
}

const  getProNew = async (params)=>{
    const res = await request.get('/api/base/wellProject/listProjectByUserId',{params})
    return res.data
}
const  getStart = async (params)=>{
    const res = await request.get('/api/system/well/start',{params})
    return res.data
}

const  getNum = async (params)=>{
    // const res = await request.get(`/base/wellInfo/listWell?projectId='1582216094342254594'`)
    const res = await request.post('/api/base/wellInfo/listWell',params)
    return res.data
}

const  getCly = async (params)=>{
    const res = await request.get('/api/base/wellInfo/listWellInfoPeriod',{params})
    return res.data
}

const getData = async (params)=>{
    const res = await request.post('/api/base/wellInfo/detailPeriod',params)
    return res.data
}
const exportRunMarket = async (data)=>{
    const res = await request({
        method:'post',
        url:'/api/system/well/exportXls',
        data,
        headers: {
            'Content-Type': 'application/json',//设置请求头请求格式为JSON
          },
          responseType:'blob', 

       
    })
    return res.data
}


const login = async (data)=>{
    const res = await request({
        method:'post',
        url:'/api/user/login',
        data,
        headers: {
            'Content-Type': 'application/json',//设置请求头请求格式为JSON
          },
       
    })
    return res.data
}
const getPumpData = async (data)=>{
    const res = await request({
        method:'post',
        url:'/api/base/wellInfo/userWell',
        data,
        headers: {
            'Content-Type': 'application/json',//设置请求头请求格式为JSON
          },
       
    })
    return res.data
}

export {
    getPro,
    getNum,
    getCly,
    getData,
    getProNew,
    login,
    getPumpData,
    exportRunMarket,
    getStart
}
